package com.kfm.jdbc.day0329;

import java.io.BufferedOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo08 {

    public static void main(String[] args) {
        try (FileOutputStream fos = new FileOutputStream("d:\\io\\buffered-out.txt");
             BufferedOutputStream bos = new BufferedOutputStream(fos);){

            bos.write("你好".getBytes());

            bos.flush();

        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
